<template>
  <div style="padding: 0 15px" @click="toggleClick">
    <svg-icon
      :class="{ 'is-active': isActive }"
      icon-name="ant-design:bars-outlined"
      class-name="hamburger"
    ></svg-icon>
  </div>
</template>

<script setup lang="ts">
const { isActive = false } = defineProps<{
  isActive?: boolean
}>()

const emit = defineEmits<{ (e: 'toggleClick'): void }>()
const toggleClick = () => {
  emit('toggleClick')
}
</script>

<style lang="scss" scoped>
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
